package com.cyt.cytcrm.controller;


import com.cyt.cytcrm.entity.Department;
import com.cyt.cytcrm.entity.Role;
import com.cyt.cytcrm.service.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author PIGS
 * @since 2020-03-23
 */
@RestController
public class DepartmentController {

    @Autowired
    private IDepartmentService service;

    @GetMapping("/depa")
    public List<Department> roles(){

        return service.list();
    }
}
